package org.sqltomongo;

import cn.org.wangchangjiu.sqltomongo.core.parser.data.PartSQLParserData;
import org.springframework.lang.Nullable;
import org.sqltomongo.orm.SqlSession;

import java.util.List;

public class SQLToMongoTemplate {

    private SqlSession sqlSession;

    public SQLToMongoTemplate(SqlSession sqlSession){
        this.sqlSession = sqlSession;
    }

    public PartSQLParserData sqlParserData(String sql, Object... parameters) {
        return sqlSession.sqlParserData(sql, parameters);
    }

    public <T> T selectOne(String sql, Class<T> returnType, @Nullable Object... parameters) {
        return sqlSession.selectOne(sql, returnType, parameters);
     }


    public <T> List<T> selectList(String sql, Class<T> returnType, @Nullable Object... parameters) {
      return sqlSession.selectList(sql, returnType, parameters);
    }

}
